/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rhythm.commons.io.filters;

import java.io.File;
import java.io.FileFilter;

/**
 *
 * @author mlee
 */
public class DirectoryOnlyFileFilter implements FileFilter {

    private static final DirectoryOnlyFileFilter INSTANCE = new DirectoryOnlyFileFilter();

    /**
     * Returns a singleton instance of the {@code DirectoryOnlyFilter}
     * @return
     */
    public static DirectoryOnlyFileFilter getInstance(){
        return INSTANCE;
    }

    private DirectoryOnlyFileFilter() {
        //Don't expose.
    }

    public boolean accept(File pathname) {
        return pathname.isDirectory();
    }
}
